Creating a Database Table
Description
To create a new database table in the Model Tree:
- Select the position in a Declaration Section where the new database table should be inserted 
- From the Edit menu select Insert – Other (or press the - <Insert>key)
- In the dialog box select  Database table and press OK Database table and press OK
- Enter a name for the new database table 
- Press - <Enter>to create the new database table (or press- <Esc>to abort the operation)
The newly created database table is not yet ready for use, because you should at least specify some mandatory attributes. To modify the attributes of the newly created database table:
- Press - <Enter>or double click on the database table node.
The most commonly used attributes of a database table identifier are discussed below.
- INDEX DOMAIN: The- INDEX DOMAINattribute should be specified in order to declare indexed database tables. The wizard will display the Set Dependency Tree of your model and allows you to select one or more indices. wizard will display the Set Dependency Tree of your model and allows you to select one or more indices.
- DATA SOURCE: The- DATA SOURCEattribute should be used to specify the data source that will be used when communicating with the data provider (e.g. database). The data source contains information about how to connect to the data provider. This field can either contain a reference to an ODBC data source ( a dsn file or user/system data source), or a string parameter specifying one of these data sources. The wizard will display a menu allowing you to select either a File Data Source (dsn), a User/System Data Source or a string parameter from your model that will be used to specify the data source. When you select user/system data source a dialog will be opened in which you can select an ODBC Data Source. In this dialog you can also select a new data source or export an existing ODBC data source to a file data source. You can also configure your ODBC setup from the ODBC icon in the Windows Control Panel. wizard will display a menu allowing you to select either a File Data Source (dsn), a User/System Data Source or a string parameter from your model that will be used to specify the data source. When you select user/system data source a dialog will be opened in which you can select an ODBC Data Source. In this dialog you can also select a new data source or export an existing ODBC data source to a file data source. You can also configure your ODBC setup from the ODBC icon in the Windows Control Panel.
- TABLE NAME: The- TABLE NAMEattribute should be used to specify the name of the data table name that is communicated with. Typically a data source contains multiple data tables. The wizard will display a menu allowing you to select either an available data table or a string parameter from your model that will be used to specify the data table. wizard will display a menu allowing you to select either an available data table or a string parameter from your model that will be used to specify the data table.
- MAPPING: The- MAPPINGattribute should be used to specify the relations between the data base columns and the AIMMS model identifiers. The wizard will display a dialog box allowing you to select columns in the specified data table and AIMMS identifiers. wizard will display a dialog box allowing you to select columns in the specified data table and AIMMS identifiers.
Learn more about
- Database tables and database table attributes (Language Reference)